package org.piggy.core.handler;

import org.piggy.common.rule.Rule;
import org.piggy.config.center.api.RulesChangeHandler;
import org.piggy.core.manager.DynamicConfigManager;
import java.util.List;

public class NacosRulesChangeHandler implements RulesChangeHandler {
    @Override
    public void onRulesChange(List<Rule> rules) {
//        DynamicConfigManager.getInstance().putAllPathRule(rules);
        DynamicConfigManager.getInstance().putAllPathRulePro(rules);
        DynamicConfigManager.getInstance().initFlowQpsRule(rules);
        DynamicConfigManager.getInstance().initDegradeRule(rules);
    }
}
